<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
    <input id="btn" type="button" value="click">
</body>
<script>
  // 前端javascript : ECMASscipt + DOM + BOM
  // 浏览器可以通过其内置的V8引擎来解析ECMASscipt语法
  //浏览器可以通过其文档模块来解析DOM操作
  
  var btn = document.querySelector("#btn");
  btn.onclick = function(){
    alert("hello world")
  }
</script>
</html>